home *** CD-ROM | disk | FTP | other *** search
- #include "my color.h"
-
- void do_mouse_down(the_event) /* This routine is called for every mouse down event */
- EventRecord *the_event;
- {
- CWindowPtr whichWindow;
- long grow_window_result;
- ControlHandle control;
-
- switch (FindWindow(the_event->where,&whichWindow))
- {
-
- case inSysWindow:
- SystemClick(&the_event,whichWindow);
- break;
- case inMenuBar:
- DoCommand(MenuSelect(&the_event->where));
- break;
- case inDrag:
- DragWindow(whichWindow,the_event->where,&dragRect);
- break;
- case inContent:
- if (whichWindow != (CWindowPtr)FrontWindow())
- SelectWindow(whichWindow);
- else if(!do_controls(whichWindow, the_event->where))
- {
- GlobalToLocal(&the_event->where);
- extendedCH = ((the_event->modifiers & shiftKey) != 0);
- TEClick(the_event->where,extendedCH,textH);
- } /*else*/
- break;
- case inGoAway:
- if (TrackGoAway (whichWindow, &the_event->where))
- KillWindow (whichWindow);
- break;
-
- case inGrow:
- grow_window_result = GrowWindow(whichWindow,the_event->where, &screenBits.bounds);
- if(grow_window_result)
- {
- invalidate_controls(whichWindow);
- SizeWindow(whichWindow, LoWord(grow_window_result),
- HiWord(grow_window_result), TRUE);
- adjust_scroll_bars(whichWindow);
- adjust_TE_rect(whichWindow);
- }
- break;
-
- } /*switch FindWindow*/
- }